package com.example.pomelo_home.controller;

import com.example.pomelo_home.service.ManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/manager")
public class ManagerController {
    @Autowired
    ManagerService managerService;

    @GetMapping("login")
    public List<Map<Integer, Object>> findUser(String name, String password) {
        return managerService.findUser(name, password);
    }
}
